        :root {
            --text-main: #ffffff;
            --text-muted: rgba(255, 255, 255, 0.7);
            --primary: #ff4d00;
            /* Orange */
            --accent: #ff4d00;
            /* Orange */
            --cyan: #ff8c00;

            /* Magic Variables updated by JS */
            --mouse-x: 50%;
            --mouse-y: 50%;
            --scroll-velocity: 0;

            --nav-width-expanded: 1100px;
            --nav-width-collapsed: 500px;

            --ease-elastic: cubic-bezier(0.175, 0.885, 0.32, 1.15);
            /* Springy */
            --ease-smooth: cubic-bezier(0.16, 1, 0.3, 1);
            /* Apple-like */
        }

        /* --- WRAPPER FOR PERSPECTIVE --- */
        .stage {
            perspective: 1000px;
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            z-index: 1000;
            pointer-events: none;
            /* Let clicks pass through outside navbar */
        }

        /* --- THE NAVBAR ITSELF --- */
        .navbar-card {
            position: relative;
            top: 24px;
            left: 50%;
            /* Complex transform for centering + physics skew */
            transform: translateX(-50%) skewY(calc(var(--scroll-velocity) * 0.1deg));

            width: 92%;
            max-width: var(--nav-width-expanded);
            height: 80px;
            border-radius: 20px;

            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 0 1.5rem;

            /* Glassmorphism Base */
            background: rgba(15, 15, 20, 0.65);
            backdrop-filter: blur(24px) saturate(180%);
            -webkit-backdrop-filter: blur(24px) saturate(180%);

            /* Borders handling */
            box-shadow:
                0 20px 40px -5px rgba(0, 0, 0, 0.6),
                0 0 0 1px rgba(255, 255, 255, 0.05);
            /* Base subtle border */

            transition:
                width 0.8s var(--ease-elastic),
                height 0.8s var(--ease-elastic),
                padding 0.8s var(--ease-elastic),
                background 0.5s ease,
                border-radius 0.8s var(--ease-elastic),
                transform 0.1s linear;
            /* Velocity skew needs instant response */

            pointer-events: auto;
            overflow: hidden;

            /* Integration: neutralize the existing global `nav {}` rule */
            border-bottom: none;
            font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
        }

        /* --- SPOTLIGHT BORDER GLOW --- */
        /* We use an ::after element that tracks the mouse */
        .navbar-card::after {
            content: "";
            position: absolute;
            inset: -1px;
            border-radius: inherit;
            padding: 1px;
            /* border thickness */
            background: radial-gradient(600px circle at var(--mouse-x) var(--mouse-y),
                    rgba(255, 255, 255, 0.4),
                    transparent 40%);
            -webkit-mask:
                linear-gradient(#fff 0 0) content-box,
                linear-gradient(#fff 0 0);
            -webkit-mask-composite: xor;
            mask-composite: exclude;
            pointer-events: none;
            opacity: 0.7;
            transition: opacity 0.5s ease;
        }

        /* --- SCROLLED STATE (Capsule) --- */
        body.scrolled .navbar-card {
            top: 16px;
            width: auto;
            min-width: 480px;
            max-width: var(--nav-width-collapsed);
            height: 60px;
            padding: 0 0.75rem;
            border-radius: 999px;
            background: rgba(10, 10, 14, 0.85);
            box-shadow:
                0 15px 35px -10px rgba(0, 0, 0, 0.8),
                0 0 0 1px rgba(255, 255, 255, 0.08);
            /* Slightly stronger border */
        }

        /* --- BRANDING --- */
        .brand-container {
            display: flex;
            align-items: center;
            gap: 12px;
            text-decoration: none;
            width: 160px;
            /* Fixed width to prevent jumping */
            transition: width 0.6s var(--ease-smooth);
        }

        body.scrolled .brand-container {
            width: 50px;
            /* Collapse to icon size */
        }

        .logo-icon {
            width: 40px;
            height: 40px;
            background: #000;
            border-radius: 12px;
            display: grid;
            place-items: center;
            color: #fff;
            font-size: 20px;
            overflow: hidden;
            transition: all 0.6s var(--ease-elastic);
            flex-shrink: 0;
        }

        .logo-icon img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            display: block;
        }

        body.scrolled .logo-icon {
            width: 36px;
            height: 36px;
            border-radius: 50%;
            /* Circle on scroll */
            transform: rotate(360deg);
        }

        .logo-text {
            color: #fff;
            font-weight: 700;
            font-size: 18px;
            letter-spacing: -0.02em;
            opacity: 1;
            transform: translateX(0);
            transition: all 0.5s var(--ease-smooth);
            white-space: nowrap;
        }

        body.scrolled .logo-text {
            opacity: 0;
            transform: translateX(-20px);
            pointer-events: none;
            width: 0;
            /* Hide effectively */
        }

        /* --- NAVIGATION LINKS --- */
        .nav-menu {
            display: flex;
            align-items: center;
            gap: 4px;
            position: relative;
            padding: 4px;
            background: rgba(255, 255, 255, 0.02);
            border-radius: 99px;
            border: 1px solid rgba(255, 255, 255, 0.02);
        }

        .nav-link {
            position: relative;
            padding: 10px 20px;
            color: var(--text-muted);
            text-decoration: none;
            font-weight: 500;
            font-size: 14px;
            border-radius: 99px;
            transition: color 0.3s ease;
            z-index: 2;
        }

        body.scrolled .nav-link {
            padding: 8px 16px;
            /* Smaller touch targets */
        }

        .nav-link:hover {
            color: #fff;
        }

        .nav-indicator {
            position: absolute;
            top: 4px;
            left: 5px;
            height: calc(100% - 8px);
            background: rgba(255, 255, 255, 0.08);
            border-radius: 99px;
            pointer-events: none;
            z-index: 1;
            transition:
                width 0.5s cubic-bezier(0.2, 0.8, 0.2, 1),
                transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1),
                opacity 0.3s ease;
            opacity: 0;
            box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
        }

        /* --- ACTIONS (RIGHT SIDE) --- */
        .actions-container {
            display: flex;
            align-items: center;
            gap: 12px;
        }

        .btn-premium {
            background: linear-gradient(135deg, #fff, #e0e0e0);
            color: #000;
            border: none;
            padding: 12px 24px;
            border-radius: 12px;
            font-weight: 700;
            font-size: 14px;
            cursor: pointer;
            transition: all 0.4s var(--ease-smooth);
            transform-origin: center;
            box-shadow: 0 4px 15px rgba(255, 255, 255, 0.15);
            font-family: 'Outfit', sans-serif;
        }

        .btn-premium:hover {
            transform: scale(1.05) translateY(-2px);
            box-shadow: 0 8px 25px rgba(255, 255, 255, 0.25);
        }

        body.scrolled .btn-premium {
            padding: 10px 20px;
            border-radius: 99px;
            /* Become pill like the rest */
            background: linear-gradient(135deg, var(--primary), var(--accent));
            color: #fff;
            box-shadow: 0 4px 15px rgba(255, 77, 0, 0.4);
        }

        /* --- MOBILE TOGGLE --- */
        .mobile-toggle {
            display: none;
            color: white;
            font-size: 24px;
        }

        @media (max-width: 768px) {
            .nav-menu {
                display: none;
            }

            .mobile-toggle {
                display: block;
            }

            .btn-premium {
                display: none;
            }

            .navbar-card {
                width: 90%;
                min-width: auto;
                justify-content: space-between;
            }

            body.scrolled .navbar-card {
                width: 92%;
                min-width: auto;
            }

            body.scrolled .brand-container {
                width: auto;
            }

            body.scrolled .logo-text {
                display: none;
            }
        }
